package com.android.accessibility.ad;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;

import com.android.accessibility.R;
import com.android.accessibility.activity.HomeActivity;
import com.android.accessibility.ad.ForwardChecker.OnSplashListener;

public class SplashActivity extends Activity implements OnSplashListener  {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.splash);
        ForwardChecker.get(this).showSplash(null, this);
    }

    /**
     * 跑应用的逻辑
     */
    private void runApp() {
        Intent intent = new Intent(this, HomeActivity.class);
        startActivity(intent);
        finish();
    }

    @Override
    public void onBackPressed() {
    }

    @Override
    public void onSplashComplete() {
        runApp();
    }
}
